<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增费用项信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-expenseItemInfo-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required" >费用类型：</label>
                <div class="col-sm-8">
                    <select name="expenseType" class="form-control m-b" required>
                        <option value="">请选择费用类型</option>
                        <option value="0">其他</option>
                        <option value="1">物业费</option>
                        <option value="2">电费</option>
                        <option value="3">水费</option>
                        <option value="4">停车费</option>
                        <option value="5">空调费</option>
                        <option value="6">租金</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">收费项目：</label>
                <div class="col-sm-8">
                    <input name="payItems" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">费用标识：</label>
                <div class="col-sm-8">
                    <select name="feeFlag" class="form-control m-b" required>
                        <option value="">请选择费用标识</option>
                        <option value="0">周期性费用</option>
                        <option value="1">一次性费用</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">催缴类型：</label>
                <div class="col-sm-8">
                    <select name="billType" class="form-control m-b" required>
                        <option value="">请选择催缴类型</option>
                        <option value="0">每年一月一日</option>
                        <option value="1">每月一日</option>
                        <option value="2">每日</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">付费类型：</label>
                <div class="col-sm-8">
                    <select name="paymentType" class="form-control m-b" required>
                        <option value="">请选择付费类型</option>
                        <option value="0">预付费</option>
                        <option value="1">后付费</option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">缴费周期(单位:月)：</label>
                <div class="col-sm-8">
                    <input name="paymentCycle" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">计费起始时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="startTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">计费终止时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="endTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">计费单价(单位:元)：</label>
                <div class="col-sm-8">
                    <input name="squarePrice" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label ">附加/固定费用(单位:元)：</label>
                <div class="col-sm-8">
                    <input name="additionalAmount" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "property/expenseItemInfo"
        $("#form-expenseItemInfo-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-expenseItemInfo-add').serialize());
            }
        }

        $("input[name='startTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='endTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>